const Router = require("koa-router");

const router = new Router({ prefix: "/admin" });

const {
  adminLogin,
  adminRegister,
  adminIsTimeOut,
  adminCurrentInfo,
  adminFindOne,
  adminFindAll,
  adminUpate,
  adminDelete
} = require("../controls/admin");

// 登录
router.post("/login",   );
// 注册
router.post("/register", adminRegister);
// 身份过期
router.get("/isTimeOut", adminIsTimeOut);
// 当前用户
router.get("/currentInfo", adminCurrentInfo);
// 查询单个用户
router.get("/findOne", adminFindOne);
// 获取管理员列表
router.get("findAll", adminFindAll);
// 更新管理员信息
router.put("/update/:adminId", adminUpate);
// 删除管理员
router.delete("/delete/:adminId", adminDelete);

module.exports = router;
